package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demo.entity.Shop;
import com.example.demo.mapper.ShopMapper;
import com.example.demo.service.IShopService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bw
 * @since 2022-01-07
 */

@Service
public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements IShopService {

    @Override
    public PageInfo<Shop> listpage(Shop shop,Integer pageNum, Integer pageSize) {

        PageHelper.startPage(pageNum,pageSize);
        List<Shop> list = getBaseMapper().selectbyName(shop);
        PageInfo<Shop> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
